package com.ww.microrpc;

import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.cloud.client.serviceregistry.ServiceRegistry;
import org.springframework.context.annotation.Bean;

public class MicroRpcServiceDiscoveryAutoConfiguration {

    @Bean
    @ConditionalOnBean(ServiceRegistry.class)
    public MicroRpcServiceRegisterListener getServiceRegisterListener(){
        return new MicroRpcServiceRegisterListener();
    }

    @Bean
    public RegisterDiscoveryProperties getMicroDiscoveryProperties(){
        return new RegisterDiscoveryProperties();
    }
}
